def remove_empty_lines_basic(input_file, output_file=None):
    """
    删除Markdown文件中的完全空白行
    """
    if output_file is None:
        output_file = input_file

    # 读取文件
    with open(input_file, 'r', encoding='utf-8') as f:
        lines = f.readlines()

    # 过滤掉空白行
    non_empty_lines = [line for line in lines if line.strip()]

    # 写回文件
    with open(output_file, 'w', encoding='utf-8') as f:
        f.writelines(non_empty_lines)

    print(f"处理完成：{len(lines)} 行 → {len(non_empty_lines)} 行")


# 使用示例
remove_empty_lines_basic('E:\\github\\PythonProject\\TaskPlanningAgent\\doc\\创建智能体.md')